Topic Index

GALAXY HELP

Index  (this topic)

Shareware Registration

Description

Overview of Operation

Setting Parameters

Saving and Recalling Parameters

Menu Commands

Parameter Names

Application Notes

Use as Screen Saver


Registration

Shareware Registration

Galaxy is a shareware program.  The license price is $10.00 for unlimited use on a single computer.   When you use Galaxy, you will be asked to register a license key.  When you register a key, by using the register menu to input your key value, the reminders to register will stop.  Until you obtain a key, you can use Galaxy normally, since nothing is disabled.

To register, send your check to the author, along with the product name (Galaxy), and the domain name of the NT computer where Galaxy will be used (the name assigned to your computer when NT was installed).  You will receive a key value (a big number) by return post, or by e-mail if you provide an address.  Use this value with the register menu, to make the registration requests go away.  The same key may also be used with later versions of Galaxy.  If you need to move the license to another computer (with a different domain name), a new key may be obtained gratis from the author.

The author may be contacted by any of the following means:

Compuserve	76450, 2336
FAX	(408) 942-9180
Phone	(408) 263-2268
Internet	mico@ix.netcom.com

post	Mike Cornelison
1806 Milmont Drive #185
Milpitas, CA  95035

You may freely redistribute Galaxy, as long as all files in the original distribution are included, and no fee is charged except for media.   Galaxy is copyrighted.  All rights are retained.   The author does not warrant the suitability of Galaxy for any purpose.

Registration via CompuServe: GO SWREG and use registration ID  881.  $10 will be deducted from your account.  Then E-mail your domain name and get your license key, to stop the registration reminders.


Program Description

Galaxy is a computer program which simulates the motions of stars under the influence of gravity.  You may create a field of stars to begin with, and then watch how the stars move as they are accelerated by their mutual gravitational attractions.  You may vary the number of stars, their initial velocities around a central position, and the magnitude of the Gravity Constant, which determines the attractive force between every pair of stars.  You may witness how the attractive forces accelerate individual stars and send them careening off into new directions.  You may also witness how large groups of stars develop into interesting patterns of distribution over time.  You can see in a few minutes what would require millions of years for real stars.

When two stars are simulated, a stable orbital pattern of rotation and precession will persist for a relatively long time (not forever, due to computational imprecision).  When three or more stars are simulated, various orbital patterns come and go with varying degrees of persistence or stability.  The three-body problem has no analytic solution and is inherently chaotic.  Some semi-persistent and recurring patterns may be seen (chaotic attractors).


Overview of Operation

When the program is started, you will see the following window and menu:

Select the Setup menu and use the Setup Dialog Box to make any desired changes in the parameters.  Alternatively, use the menu File/Open to recall parameters saved earlier in a file.  Note: use a low number of stars (2-40) until you become familiar with the operation of the program.  This will make things happen faster.

Select the Init menu to initialize the display.  The stars are stationary.  You may use Init at any time to initialize a new simulation with a new star field.  A new random pattern is generated with each new initialization.

Select the Run menu to start the simulation.  The stars move.  The Run menu changes its name to Pause.  You may stop the simulation by selecting Pause (the Run menu is now restored).  Use Pause/Run to step through the simulation slowly.

Select Exit to terminate at any time.

While running, you may go back and select any other menu.  New parameters will be effective with the next Run command

If you wish to save the current parameter settings for later recall, use the menu File/Save As for this.


Setting Parameters

When the menu Setup is selected, you get a dialog box as follows:

Use the mouse or tab key to select any desired parameter.  You may edit the new value directly inside its box, or use the scroll bar to adjust the value up or down.  The number of stars may range from 2 to 5000 stars.  The other parameters range from 0 to 99.  See the topic Parameter Names for an explanation of each parameter.


Saving and Recalling Parameters

When the menu  File/Open  or  File/Save As  is selected, you get the following dialog:

This dialog is used to specify a file and directory name for loading parameters from disk (File/Open), or saving parameters to disk (File/Save As).  It is like most other file dialogs in Windows NT.

Use the mouse to select a file from the select list, or select another directory, or select another drive (the select list will be updated).  You may also type a file or directory name directly into the edit controls.  You may type a wildcard file name into the filter control, and this will cause only matching files to appear in the select list.  Use the filter button to refresh the select list after editing the filter or directory name.  When you have gotten the desired file name and directory name to appear, choose OK to complete the command.  Choose cancel to  return to the main menu without any action being taken.


Menu Items

Menu Commands

The Menu for Galaxy is summarized below:

File	container for three following menu items
Open	open a file and read parameters from this file
Save	save current parameters in original file
Save As	save current parameters in a new file
Exit	quit program, close window
Setup	view parameters and make any desired changes
Init	generate and display a new distribution of stars
Run	start simulation (stars move)
Pause	pause simulation (stars stop)
Cancel	quit program, close window
Help	view help topics (this file)


Parameter Table

Parameter Name	Description
Number of Stars    (2 - 5000)	number of stars to display and simulate
Gravity Constant    (0 - 99)	relative strength of attractive forces between stars
Initial Velocity    (0 - 99)	velocity of stars at start of simulation (clockwise around center of display)
Calc. Precision    (0 - 99)	accuracy of calculation: low value is less precise but allows faster simulation
Color Intensity    (0 - 99)	0 = white    99 = max colors


Application Notes

The execution time is proportional to the square of the number of stars, so a large number of stars results in slow execution.  The computer needs to make about twenty arithmetic calculations to compute the attractive force between two stars.  For 1000 stars, this is 20 million calculations.  These calculations are repeated continuously as the stars move and the forces change.  A star's new acceleration is computed from the net attractive force from all other stars, and then its new velocity is computed, and then its new position.  If you want to watch 1000 stars, you need to wait a few minutes (or hours, depending on the speed of your computer) to see how the pattern evolves.

The execution can be speeded up by using a low value for the Calculation Precision parameter.  This reduces the frequency of recalculation of forces and accelerations (i.e. the stars are moved for longer time intervals between recalculations of acceleration).  However, the resulting lack of precision introduces chaos into the system, and the evolving pattern for a large aggregate of stars will be more chaotic and less pleasing.

You may use the File Manager associate menu to associate parameter files (with the extension .gax) with the program file galaxy.exe.  Then, when you double-click a parameter file, the Galaxy program will run using these parameters.


Usage as Screen Saver

Use of Galaxy as a Screen Saver

1.	Copy the execution file galaxy.exe into your Windows NT system32 directory.
(e.g.  c:\winnt\system32 )

2.	Rename the file to galaxy.scr  (c:\winnt\system32\galaxy.scr).

3.	Activate Program Manager, select Control Panel, select Desktop.
Select  galaxy.scr as your screen saver function.

4.	Press the setup button and the Galaxy program should now run.
(ignore any message about not finding the setup file).

5.	Select the setup menu and enter setup parameters as desired.

6.	Use the File/Save As menu to save the setups in the file galaxy.gax in the same directory (c:\winnt\system32\galaxy.gax).  The setup data saved here will be used whenever the screen saver is activated.

7.	Exit the Galaxy program, returning to the Control Panel dialog.  Press the test button to test that the screen saver runs.  It should cover the whole screen, and show no menu bar.  Press any key, or the left mouse button, to return back to Control Panel.  This completes the setup.

8.	You may change the screen saver parameters saved in galaxy.gax at any time by repeating steps 3 to 6 above.

Suggestion: use a large number of stars (1000 or more) and the highest accuracy (99), since speed is not important in a screen saver, and the resulting patterns will be more varied and interesting.